/**
 * 
 */
 
//////////////////////////////////////////////////////////////////////////////////////
function showDate()
{
		var today 	= new Date();
		var day 	= today.getDay();
		var mon 	= today.getMonth();
		var year = today.getFullYear();
		var date = today.getDate();
		
		mon = mon+1;
		mon = checkTime(mon);
		date = checkTime(date);
		
		var week;
		switch(day)
		{
			case 0:
				week = "星期日";break;
			case 1:
				  week ="星期一"; break;
			case 2: week="星期二"; break;
			case 3: week ="星期三"; break;
			case 4: week="星期四"; break;
			case 5: week="星期五"; break;
			case 6: week="星期六"; break;
		}
    
		document.getElementById('show_solardate_5').innerHTML =year+"-"+mon+"-"+date+" "+week;
		t= setTimeout('startTime()',500)
 }
 
 function startTime()
 {
 	var today 	= new Date();
 	var h = today.getHours();
	var m = today.getMinutes();
	var s = today.getSeconds();
	m = checkTime(m);
	s = checkTime(s);
	
	document.getElementById('show_solardate_6').innerHTML =h+":"+m+":"+s;
	t= setTimeout('startTime()',500)
 }

function checkTime(i)
{
	if(i <10)
	{
		i = "0"+i
	}
	return i;
 }
 
 function setTime()
 {
 	showDate();
 	startTime();
 }
 
setTime();

window.onload = function()
{
	var elm = document.getElementById("tab_list");
	var list = elm.getElementsByTagName('li');
	for(var i=0; i<list.length; i++)
	{
		list[i].onclick =function()
		{
			for(var j=0; j<list.length; j++)
				list[j].className ="inactive";
			this.className ="active";
			
			var index =this.title;
			for(var tag =1; tag <=9; tag++)
			{
				var _id ="list_page_id";
				_id =_id + tag;
				var obj =document.getElementById(_id);
				
				if(index == tag)
				{
					obj.style.display='block'
				}
				else
				{
					obj.style.display='none'
				}
			}
		}
	}
} 
 
 
 